<div class="row-fluid listcontent">
    <div class="span12">
        <div class="portlet box grey">
            <div class="portlet-title">
                <div class="caption"><i class="icon-cogs"></i>广告列表</div>
                <div class="actions" id="orderaline">
                    <div class="btn-group">
                        <a href="/admin/advertisement/add" class="btn blue"><i class="icon-pencil"></i>&nbsp;&nbsp;添加</a>
                    </div>
                    <div class="btn-group">
                        <a class="btn blue" href="#" data-toggle="dropdown">
                            <i class="icon-cogs"></i>&nbsp;&nbsp;操作
                            <i class="icon-angle-down"></i>
                        </a>
                        <ul class="dropdown-menu pull-right">
                            <li><a id="info_delete"><i class="icon-trash"></i>删除广告</a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="portlet-body">
                <div class="dataTables_wrapper form-inline">
                    <div class="row-fluid">
                        <div class="span12">
                            <form id="searchform" action="{$action}" method="post">
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <label>
                                        <input type="button" class="btn blue searchsubmit" value="关键字"/>
                                        <input type="text" name="search[]"
                                               aria-controls="sample_2" class="m-wrap" value="{$search[0]?$search[0]:''}" style="height:20px;width: 160px" placeholder="ID|标题"/>
                                    </label>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <label>
                                        <input type="button" class="btn blue searchsubmit" value="开始时间"/>
                                        <input type="text" name="search[]"
                                               aria-controls="sample_2" class="m-wrap" value="{$search[1]?$search[1]:''}" style="height:20px" onclick="WdatePicker({lang:'zh-cn',dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
                                    </label>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <label>
                                        <input type="button" class="btn blue searchsubmit" value="结束时间:"/>
                                        <input type="text" name="search[]" placeholder=""
                                               aria-controls="sample_2" class="m-wrap" value="{$search[2]?$search[2]:''}" style="height:20px" onclick="WdatePicker({lang:'zh-cn',dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
                                    </label>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <input type="button" class="btn blue searchsubmit" value="状态:  "/>
                                    <select name='search[]' style="width: 120px;margin-right: 10px">
                                        <option value="">全部</option>
                                        <?php foreach ($status as $key => $vo) { ?>
                                            <option value="{$key}"
                                                <?php if (isset($search[3]) && ($search[3] == $key)) { ?>
                                                    selected="selected"
                                                <?php } ?> >
                                                {$vo}
                                            </option>
                                        <?php } ?>
                                    </select>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left;margin-left:10px">
                                    <label>
                                        <input type="button" class="btn blue search" value="查询"/>
                                    </label>
                                </div>
                            </form>
                        </div>
                    </div>
                    <table id="basicinfo" class="table table-hover table-bordered">
                        <thead>
                        <th style="width:8px;"><input type="checkbox"/></th>
                        <th>序号</th>
                        <th>ID</th>
                        <th>标题</th>
                        <th>图片名称</th>
                        <th>图片</th>
                        <th>图片顺序</th>
                        <th>上传时间</th>
                        <th>状态</th>
                        <th style="width:110px;">操作</th>
                        </thead>
                        <tbody>
                        {if(count($list)>0)}
                        {volist name='list' id='val' k='key'}
                        <tr class="odd gradeX ">
                            <td><input type="checkbox" class="checkboxes" name="id" value="{$val.banner_id}"/></td>
                            <td>{++$key+$pages}</td>
                            <td>{$val.banner_id}</td>
                            <td>{$val.banner_titles}</td>
                            <td>{$val.banner_title}</td>
                            <td><img src="{$val.banner_img}" style="width:100px;height:100px"></td>
                            <td>
                                <input type="text" value="" placeholder="{$val.banner_sort}" class="sort"
                                       data-value="{$val.banner_sort}" data-wine="{$val.banner_id}"
                                       onchange ="changeSort({$val.banner_sort},{$val.banner_id})"
                                       style="width:80px;text-align: center;" onkeyup="this.value=this.value.replace(/\D/gi,'')" >
                            </td>
                            <td>{$val.banner_time}</td>
                            {if $val.banner_status==1}
                            <td>启用</td>
                            {else /}
                            <td>禁用</td>
                            {/if}
                            {if $val.banner_status==1}
                            <td>
                                <a class="btn mini red reset" data-class='reset' data-id='{$val.banner_id}'><span>禁用</span></a>
                                <a class="btn mini blue update"  data-id='{$val.banner_id}'><span>修改</span></a>
                                <a class="btn mini yellow detail"  data-id='{$val.banner_id}'><span>查看详情</span></a>
                            </td>
                            {else /}
                            <td>
                                <a class="btn mini purple starts" data-class='start' data-id='{$val.banner_id}'><span>启用</span></a>
                                <a class="btn mini blue update"  data-id='{$val.banner_id}'><span>修改</span></a>
                                <a class="btn mini yellow detail"  data-id='{$val.banner_id}'><span>查看详情</span></a>
                            </td>
                            {/if}
                        </tr>
                        {/volist}
                        {else/}
                        <tr>
                            <td colspan="16"><span style="margin-left: 50px">暂无数据</span></td>
                        </tr>
                        {/if}
                        </tbody>
                    </table>
                    <input type="hidden" name="page" value="{$page?$page:''}">
                </div>
            </div>
        </div>
        {if(!empty($list))}
        {$list->render()}
        {/if}
    </div>
</div>